'use strict';

/**
 * @ngdoc function
 * @name mytodoApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the mytodoApp
 */
angular.module('myTimeLine')
  .controller('MainCtrl', function ($scope) {
  	$scope.todos=['吃饭','睡觉','打dota','出去玩'];
  	$scope.addTodo=function(){
  		// console.log($scope)
  		$scope.todos.push($scope.todo);
  		 $scope.todo = ''; 
  	};
  	$scope.removeTodo = function (index) {
  	  $scope.todos.splice(index, 1);
  	};
  });
